package wdc.test;
import java.util.ArrayList;

import fbp.engine.Network;


/** Example of FBP for Data Mining
 * @author boldak
 *
 */
public class TESTNetwork extends Network{
	  
	protected void define() {
		component("SERIE", SERIE.class);
		component("MAX", MAX.class);
		component("CONSOLE2", CONSOLE.class);
		component("TRANSFORM", TRANSFORM.class);
		
		ArrayList<Double> s = new ArrayList<Double>();
		
		connect(component("SERIE"), port("OUT[0]"), component("MAX"), port("IN"));
		connect(component("MAX"), port("OUT"), component("TRANSFORM"), port("SCALE"));
		connect(component("SERIE"), port("OUT[1]"), component("TRANSFORM"), port("SERIE"));
		connect(component("TRANSFORM"), port("OUT"), component("CONSOLE2"), port("IN"));
				
		s.add(new Double(10.0));
		s.add(new Double(2.0));
		s.add(new Double(4.0));
		s.add(new Double(6.0));
		initialize(s, component("SERIE"), port("IN"));
	}
	  
	public static void main(String[] args) {
		try {
			new TESTNetwork().go();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
